<?php
namespace View;

require_once("Model/UserLogin.php");
require_once("Model/DateSet.php");

class PageView {
	
	/**
	 * @var Date (Innehåller dagens datum)
	 */
	private $date;
	
	public function __construct(){
		$getDate = new \Model\DateSet();
		$this->date = $getDate->dateHandler();
	}
	
	/**
	 * @param $title (Sidans titel)
	 * @param $body (Sidans innehåll)
	 *
	 * @return String (Sträng med htmlkod)
	 */
	public function getPage($title, $body){
		return "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
				    <head>
				        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
				        <title>" . $title . "</title>
				    </head> 	
					<body>
						" . $body . "
						<p>$this->date</p>
					</body>
				</html>";
	}
}
